package com.bjpowernode.crm.workbench.mapper;

import com.bjpowernode.crm.workbench.domain.Activity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ActivityMapper {

    //添加市场活动
    int insertSelective(Activity record);
    //删除市场活动
    int deleteList(String[] ids);
    //有选择的修改市场活动
    int updateByPrimaryKeySelective(Activity record);
    //根据主键查询
    Activity selectByPrimaryKey(String id);
    //根据主键查询详情
    Activity selectByPrimaryKeyForDetails(String id);
    //有条件的查询
    List<Activity> selectByConditions(Activity activity);
    //有选择导出数据
    List<Activity> selectByIds(String[] ids);
    //导出全部数据
    List<Activity> selectAll();
    //导入数据
    int insertForList(List<Activity> list);
    //根据市场活动名称模糊查询和线索id
    List<Activity> selectByNameAndClueId(@Param("activityName") String name,@Param("clueId") String clueId);
    List<Activity> selectByName(@Param("activityName") String name);
    //根据线索主键查找该线索关联的市场活动
    List<Activity> selectActivityByCluePrimaryKey(String id);

}